using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class SearchUI : MonoBehaviour
{
    public TMP_InputField inputField;

    private void Start()
    {
        inputField.onValueChanged.AddListener(OnInputValueChanged);//监听输入框内容变化 属于注册监听器的行为
    }

    private void OnInputValueChanged(string value)//会在输入框内容改变时触发
    {
        InventoryUI.Instance.SearchItem(value);
    }
}
